<?php 
include('common_include.php');
include('validateSession.php');

$initAboutUs = '';
$dao = new SQLitePersistence();
$initAboutUs = $dao->getAboutUsInfo();
unset($dao);
?>

<html>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<title>
	Update About Us
</title>
<script>
function validate() {
	if (document.forms[0].aboutUsTextArea.value == '') {
		alert('About us information cannot be empty.');
		document.forms[0].aboutUsTextArea.focus();
		return false;
	} 
	return true;
}

</script>
</head>
<body>

<form action="UpdateAboutUsController.php" method="post" onsubmit="return validate();">
<table>
	<tr>
		<td class="errorLabel">
			<?php echo $_GET['error']; ?>
		</td>
	</tr>
	<tr>
		<td class="labelClass">
			About Us:
		</td>
	</tr>
	<tr>
		<td class="labelClass">
			<textarea name="aboutUsTextArea" rows="20" cols="80"><?php echo $initAboutUs ?></textarea>
		</td>
	</tr>
	<tr>
		<td>
			<input type="submit" value="Submit"/>
		</td>
	</tr>
</table>
</form>

</body>
</html>